class Base {
    public int a;
    public int b;
    public int c = 199;
    public void methodBase() {
        System.out.println("Base");
    }
}

class Derived extends Base {
    public int c = 9;

    public void methodDerived() {
        System.out.println("Derived");
    }
    public void methodBase(int a) {
        System.out.println("Derived");
    }
    public void func() {
        System.out.println(super.a);
        super.methodBase();
        methodDerived();
    }
    public void func1() {
        //子类有 那么就拿子类的 子类没 就拿父类的
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);//如果父类 和子类 有同名的成员变量，优先访问 子类自己的
        System.out.println(super.c);
    }
}
public class Test2 {
    public static void main(String[] args) {
        Derived derived = new Derived();
        derived.func();

    }
}